package com.zgkj.Zip.form;

import java.io.File;
import java.util.List;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.NodeList;

public class NoticeInfo {

	private String notice_name;  //通知书名称
	private String postcode;  //邮编
	private String address_info; //收件人地址
	private String receiver_name;  //收件人姓名
	private NoticeSent notice_sent; //通知书发文信息
	private String application_number;  //application_number
	private String application_date;    //application_date
	private String applicant_info;		//申请人信息
	private String invention_title;     //发明创造名称
	private PatentAgency patent_agency;		//代理机构信息
	private FileList file_list; 	//
	private String examiner_name; //审查员
	private String department;   //审查部门
	private String notice_template_code;   //通知书模板代码
	private String notice_version;   //通知书版本号
	private String pay_deadline_date;//缴费截止日期
	private List<Feeinfoall> fee_info_all;//费用信息

	private String annual_year;   //年费年度
	private String cost_slow_flag;   //减缓标记

	private String cost_slow_rate_annul;  //减缓比例


	public String getAnnual_year() {
		return annual_year;
	}
	public void setAnnual_year(String annual_year) {
		this.annual_year = annual_year;
	}
	public String getCost_slow_flag() {
		return cost_slow_flag;
	}
	public void setCost_slow_flag(String cost_slow_flag) {
		this.cost_slow_flag = cost_slow_flag;
	}
	public String getCost_slow_rate_annul() {
		return cost_slow_rate_annul;
	}
	public void setCost_slow_rate_annul(String cost_slow_rate_annul) {
		this.cost_slow_rate_annul = cost_slow_rate_annul;
	}
	public String getPay_deadline_date() {
		return pay_deadline_date;
	}
	public void setPay_deadline_date(String pay_deadline_date) {
		this.pay_deadline_date = pay_deadline_date;
	}
	public List<Feeinfoall> getFee_info_all() {
		return fee_info_all;
	}
	public void setFee_info_all(List<Feeinfoall> fee_info_all) {
		this.fee_info_all = fee_info_all;
	}
	public NoticeInfo(){
		this.notice_sent = new NoticeSent();
	}
	public String getNotice_name() {
		return notice_name;
	}
	public void setNotice_name(String notice_name) {
		this.notice_name = notice_name;
	}
	public String getPostcode() {
		return postcode;
	}
	public void setPostcode(String postcode) {
		this.postcode = postcode;
	}
	public String getAddress_info() {
		return address_info;
	}
	public void setAddress_info(String address_info) {
		this.address_info = address_info;
	}
	public String getReceiver_name() {
		return receiver_name;
	}
	public void setReceiver_name(String receiver_name) {
		this.receiver_name = receiver_name;
	}
	public NoticeSent getNotice_sent() {
		return notice_sent;
	}
	public void setNotice_sent(NoticeSent notice_sent) {
		this.notice_sent = notice_sent;
	}
	public String getApplication_number() {
		return application_number;
	}
	public void setApplication_number(String application_number) {
		this.application_number = application_number;
	}
	public String getApplication_date() {
		return application_date;
	}
	public void setApplication_date(String application_date) {
		this.application_date = application_date;
	}


	public String getApplicant_info() {
		return applicant_info;
	}
	public void setApplicant_info(String applicant_info) {
		this.applicant_info = applicant_info;
	}
	public String getInvention_title() {
		return invention_title;
	}
	public void setInvention_title(String invention_title) {
		this.invention_title = invention_title;
	}
	public PatentAgency getPatent_agency() {
		return patent_agency;
	}
	public void setPatent_agency(PatentAgency patent_agency) {
		this.patent_agency = patent_agency;
	}
	public FileList getFile_list() {
		return file_list;
	}
	public void setFile_list(FileList file_list) {
		this.file_list = file_list;
	}
	public String getExaminer_name() {
		return examiner_name;
	}
	public void setExaminer_name(String examiner_name) {
		this.examiner_name = examiner_name;
	}
	public String getDepartment() {
		return department;
	}
	public void setDepartment(String department) {
		this.department = department;
	}
	public String getNotice_template_code() {
		return notice_template_code;
	}
	public void setNotice_template_code(String notice_template_code) {
		this.notice_template_code = notice_template_code;
	}
	public String getNotice_version() {
		return notice_version;
	}
	public void setNotice_version(String notice_version) {
		this.notice_version = notice_version;
	}


	public static void main(String[] args) throws Exception {
//		XStream xstream = new XStream(new StaxDriver());
//		 xstream.registerConverter(new MethodConverter());
//		 FileInputStream fis = new FileInputStream("d:/GA000125151428_2001011.xml");
//		 //xstream.aliasField("datasource-name", ConfigReader.class, "datasourcename");
//		 xstream.alias("cn_notice_info", NoticeInfo.class);
//		 xstream.alias("patent_agency", PatentAgency.class);
//		 xstream.alias("agent_info", AgentInfo.class);
//		 NoticeInfo NoticeInfo = (NoticeInfo)xstream.fromXML(fis);


		 // 工厂的作用是创建具体的解析器
	        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

	        // step 2：获得具体的dom解析器
	        DocumentBuilder db = dbf.newDocumentBuilder();

	        // step 3:解析一个xml文档，获得Document对象（根节点）
	        // 此文档放在项目目录下即可
	        org.w3c.dom.Document document =  db.parse(new File("d:/GA000125151428_2001011.xml"));

	        // 根据标签名访问节点
	        NodeList list = document.getElementsByTagName("agent_name");
	        System.out.println("list length: " + list.getLength());

	        NoticeInfo NoticeInfo = new NoticeInfo();
	       // NoticeInfo.setNotice_name(XMLUtil.getElementvalue(document, "notice_name"));
	        //System.out.println(XMLUtil.getElementvalue(document, "agent_name"));

	    }


}
